Open
Conversation
Co-authored-by: JerryNixon <1749983+JerryNixon@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for XML data type in MSSQL
Support XML data type for MSSQL
Dec 4, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for SQL Server's XML data type by treating it as a string type, consistent with how SQL Server emits XML content via FOR JSON.
- Marks XML as a supported SQL type in
SqlTypeConstants.cs - Maps
SqlDbType.Xmltotypeof(string)inTypeHelper.cs
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Core/Models/SqlTypeConstants.cs | Marks xml type as supported (changed from false to true) |
| src/Core/Services/TypeHelper.cs | Adds mapping from SqlDbType.Xml to typeof(string) in the type conversion dictionary |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: JerryNixon <1749983+JerryNixon@users.noreply.github.com>
Contributor
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
JerryNixon
approved these changes
Jan 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why make this change?
Closes #2698
SQL Server's
XMLdata type (supported since SQL Server 2005) was not recognized by DAB, preventing use of tables with XML columns.What is this change?
Treat
XMLas a string type, consistent with how SQL Server emits it viaFOR JSON:xmlas supported (true)SqlDbType.Xml→typeof(string)xml_typescolumn totype_tablewith test data for integration testingDAB passes XML as string in both directions; SQL Server handles validation.
How was this tested?
Existing
CLRtoJsonValueTypeUnitTestsnow validates(xml,True)test case passes. Added XML column totype_tablein MsSql test database schema with various XML test data to enable integration testing of XML data type operations.Sample Request(s)
Response:
{ "value": [ { "id": 1, "metadata": "<author>admin</author>" } ] }Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.